package main

import "fmt"

type student struct {
	name  string
	age   int
	score int
}

func main() {

	st1 := student{
		name:  "zhangsan",
		age:   10,
		score: 90,
	}

	fmt.Println(st1)

	fmt.Println("============================")

	st2 := new(student)
	st2.name = "abc"
	fmt.Println(st2)

	fmt.Println("============================")
	changeName(st2)
	fmt.Println(st2)

	fmt.Println("============================")
	st3 := student{}
	fmt.Println(st3)
	//编译不过
	//changeName(st3)
}

func changeName(s *student) {
	s.name = "cdf"
}
